{
 "cells": [
  {
   "cell_type": "markdown",
   "id": "d58bcd57-f9b0-4b3f-8885-412b848e0abc",
   "metadata": {},
   "source": [
    "# 前言\n",
    "在开始数据分析之前，我们首先了解python中最基本的数据结构\n",
    "* 列表list\n",
    "* 字典 dict\n",
    "* 元组 \n",
    "其中字典与列表是我们比较常用的数据结构，我们会重点讲解\n"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "1965a04d-a715-4cc8-8bdb-a431d558f044",
   "metadata": {},
   "source": [
    "# 列表\n",
    "1. 基本概念\n",
    "\n",
    "序列是Python中最基本的数据结构。序列中的每个元素都分配一个数字 - 它的位置，或索引，第一个索引是0，第二个索引是1，依此类推。\n",
    "\n",
    "Python有6个序列的内置类型，但最常见的是列表和元组。\n",
    "\n",
    "序列都可以进行的操作包括索引，切片，加，乘，检查成员。\n",
    "\n",
    "此外，Python已经内置确定序列的长度以及确定最大和最小的元素的方法。\n",
    "\n",
    "列表是最常用的Python数据类型，它可以作为一个方括号内的逗号分隔值出现。\n",
    "\n",
    "列表的数据项不需要具有相同的类型\n",
    "\n",
    "创建一个列表，只要把逗号分隔的不同的数据项使用方括号括起来即可。 \n",
    "\n",
    "** pyhton中没有数组的概念，可以用list或者numpy中数组代替 ** \n",
    "\n",
    "2. 列表中数据获取\n",
    "\n",
    "3. 列表更新\n",
    "\n",
    "4. 其他列表属性\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "id": "972439c0-fdd4-4bc2-a97d-323844d31d4c",
   "metadata": {
    "execution": {
     "iopub.execute_input": "2022-03-11T09:55:15.771772Z",
     "iopub.status.busy": "2022-03-11T09:55:15.771355Z",
     "iopub.status.idle": "2022-03-11T09:55:15.776456Z",
     "shell.execute_reply": "2022-03-11T09:55:15.775853Z",
     "shell.execute_reply.started": "2022-03-11T09:55:15.771742Z"
    },
    "scrolled": true
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "list中数据类型不一定相同\n",
      "[30, '功', '名', '尘', '与', '土']\n"
     ]
    }
   ],
   "source": [
    "poem1=[30,'功','名','尘','与','土']\r\n",
    "print(\"list中数据类型不一定相同\")\r\n",
    "print(poem1)"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "py35-paddle1.2.0"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.7.4"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
